<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>制造明细</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
 
 <link rel="stylesheet" href="../../res/layuis/css/layui.css">
   <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
   <script type="text/javascript" src="../../res/layuis/layui.js" charset="utf-8"></script>
</head>
<body>
<div class="demoTable" style="margin-top: 10px;">
 
    <div class="x-body">
    <div class="layui-input-inline">
      <form class="layui-form" action="">
      
          <div class="layui-input-inline" style="width:224px;">
		      <select name="muId" lay-filter="aihao" id="muId" lay-search >
		       	<option value="">请选择乐器</option>
		      </select>
   		 </div>
        
      </form>
      </div>
       <div class="layui-input-inline">
      	<button class="layui-btn" id="search" data-type="reload" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
      </div>
<table class="layui-table"  id="manufacture" lay-filter="demo" >
  
  
</table>
 
 

 </div>
 </div>
 
 
 <script type="text/javascript">
 
 
 
layui.use('table',function(){
	  var table = layui.table;
	  var form = layui.form;
	  
	  
	  table.render({
		    elem: '#manufacture'
		    	,page: true
		    ,url:'../../listenManufacture/findByProdId.action'

		    ,cols: [[
		       {field:'mfId', align:'center'}
		      ,{field:'pdId', align:'center'}
		      ,{field:'muId', align:'center'}
		      ,{field:'stringMfTime',title: '制造时间', align:'center',width: '16%'}
		      ,{field:'muName',title: '乐器名称', align:'center'}
		      ,{field:'pdNumber',title: '任务计划', align:'center'}
		      ,{field:'mfFinish',title: '制造数量', align:'center'}
		      ,{field:'mfComplete',title: '是否完成', align:'center',templet:'#mfCompletes'}
		      ,{field:'mfNoComplete',title: '未完成部分', align:'center'}
		      ,{field:'mfNumber',title: '制造次数', align:'center'}
		    ]],done: function (res, curr, count) {
	            $("[data-field='mfId']").css('display','none');
	            $("[data-field='pdId']").css('display','none');
	            $("[data-field='muId']").css('display','none');

		    }
		  });
});


</script>
<script type="text/html" id="mfCompletes">
{{# if(d.mfComplete == 0) { }}
     <div>未完成</div>
 	 {{# } else if(d.mfComplete == 1){ }}
    <div>已完成</div>
{{# }}}
</script>

 

<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
<script type="text/javascript" src="../../res/js/manufacture/manufactureDetail.js"></script>
</body>
</html>